package com.example.tree.mapper;

import com.example.tree.domain.po.TreeIssueReport;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Insert;



public interface TreeIssueMapper {
    /**
     * 插入古树问题报告
     *
     * @param treeIssueReport
     */
    @Insert("INSERT INTO tree_issue_report (tree_id, user_id,issue_type, description, photo_urls, contact_info," +
            " report_time, status) VALUES (#{treeId},#{userId},#{issueType}, #{description}, #{photoUrls}," +
            " #{contactInfo}, #{reportTime}, #{status})")
    void insert(TreeIssueReport treeIssueReport);

    /**
     * 获取古树问题报告
     *
     * @param treeIssueReport
     * @return
     */
    Page<TreeIssueReport> getTreeIssueInfo(TreeIssueReport treeIssueReport);

    /**
     * 删除古树问题报告
     *
     * @param issueIds
     */
    int deleteTreeIssueInfo(Integer[] issueIds);

    /**
     * 修改古树问题报告
     *
     * @param treeIssueReport
     */
    void updateTreeIssueInfo(TreeIssueReport treeIssueReport);
}
